package com.jahentao.integration;

import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
import org.springframework.context.ApplicationContext;

/**
 * Created with IntelliJ IDEA.<br>
 * Description: 测试ActiveMQ与Spring集成<br>
 * User: jahen<br>
 * Date: 2017-04-03<br>
 * Time: 15:21<br>
 */
public class JMSTest {
    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext-jms.xml");

        SpringProducer producer = (SpringProducer)applicationContext.getBean("springProducer");
        producer.send();

        SpringConsumer consumer = (SpringConsumer) applicationContext.getBean("springConsumer");
        consumer.recive();

    }
}
